/*******************************************************************************
*
*   Copyright(c), 2010 ~ 2020 .
*
********************************************************************************   
*   File Name   : eos_typedef.h
*   Version     : 
*   Author      : chenglaifu 
*   Date        : 2011-08-04
*   Description : data type definitions
*
*   Histiory    :
*               :
*               :
*******************************************************************************/
#ifndef __TYPEDEF_H__
#define __TYPEDEF_H__

#ifdef __cplusplus
extern "C"{
#endif

/* EOS: Enhanced Operating System */

/*  Basic data type definitions  */
typedef void                EOS_VOID;
typedef signed char         EOS_INT8;
typedef unsigned char       EOS_UINT8;
typedef signed short        EOS_INT16;
typedef unsigned short      EOS_UINT16;
typedef signed int          EOS_INT32;
typedef unsigned int        EOS_UINT32;
typedef signed long long    EOS_INT64;
typedef unsigned long long  EOS_UINT64;
typedef float               EOS_FLOAT;
typedef double              EOS_DOUBLE;

/*   Macro definitions  */
#define     MAX_INT8        0x7f
#define     MIN_INT8        (-MAX_INT8 - 1)

#define     MAX_INT16       0x7fff
#define     MIN_INT16       (-MAX_INT16 - 1)

#define     MAX_INT32       0x7fffffff
#define     MIN_INT32       (-MAX_INT32 - 1)

#define     MAX_UINT8       0xff
#define     MAX_UINT16      0xffff
#define     MAX_UINT32      0xffffffff

#ifndef EOS_OK
#define EOS_OK          0UL
#define EOS_ERROR       1UL
#endif

typedef enum
{
    EOS_FALSE = 0,
    EOS_TRUE  = 1   
}EOS_BOOL;

#ifndef EOS_NULL
#define EOS_NULL        0UL
#endif

#define EOS_NULL_PTR    0UL

#ifdef __cplusplus
}
#endif 

#endif      /* __TYPEDEF_H__ */

